unit FMX.MeshLine;

interface

uses
  System.Classes,
  FMX.Types, FMX.Controls, FMX.Objects, FMX.StdCtrls, FMX.Graphics,
  System.Types, System.UITypes;

type

  TMeshLine = class(TShape)
  strict private
  protected
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;

    procedure Paint; override;

  published
    property Align;
    property Anchors;
    property ClipChildren default False;
    property ClipParent default False;
    property Cursor default crDefault;
    property DesignVisible default True;
    property DragMode default TDragMode.dmManual;
    property EnableDragHighlight default True;
    property Enabled default True;
    property Locked default False;
    property Height;
    property HitTest default True;

    property Padding;
    property Opacity;
    property Margins;
    property PopupMenu;
    property Position;
    property RotationAngle;
    property RotationCenter;
    property Scale;
    property Stroke;
    property Visible default True;
    property Width;
    { Drag and Drop events }
    property OnDragEnter;
    property OnDragLeave;
    property OnDragOver;
    property OnDragDrop;
    property OnDragEnd;
    { Mouse events }
    property OnClick;
    property OnDblClick;

    property OnMouseDown;
    property OnMouseMove;
    property OnMouseUp;
    property OnMouseWheel;
    property OnMouseEnter;
    property OnMouseLeave;

    property OnPainting;
    property OnPaint;
    property OnResize;
    { deprecated - moved to Stroke }
    property StrokeThickness stored False;
    property StrokeCap stored False;
    property StrokeDash stored False;
    property StrokeJoin stored False;
  end;

implementation

{ TMeshLine }

constructor TMeshLine.Create(AOwner: TComponent);
begin
  inherited;

end;

destructor TMeshLine.Destroy;
begin

  inherited;
end;

procedure TMeshLine.Paint;
var
  i: Integer;
begin
  for i := 0 to 10 do
  begin
    Canvas.DrawLine(PointF(GetShapeRect.Left, GetShapeRect.Top + i *
      (Height / 10)), PointF(GetShapeRect.Right, GetShapeRect.Top + i *
      (Height / 10)), Opacity, Stroke);

    Canvas.DrawLine(PointF(GetShapeRect.Left + i * (Width / 10),
      GetShapeRect.Top), PointF(GetShapeRect.Left + i * (Width / 10),
      GetShapeRect.Bottom), Opacity, Stroke);
  end;
end;

end.
